;;; $Id: load.sld 59 2012-07-19 05:34:04Z alan.watson.f $

(define-library (oaxaca load)

  (export load)

  (import (scheme base)
          (scheme case-lambda)
          (prefix (scheme load) scheme:))

  (import (oaxaca repl))

  (begin

    ;; This library mirrors the (scheme load) library, except its load
    ;; procedure defaults to the environment returned by the
    ;; interactive-environment procedure exported by the (oaxaca repl)
    ;; library and not the (scheme repl) library.

    (define load
      (case-lambda
       ((file-path)
        (scheme:load file-path (interaction-environment)))
       ((file-path environment)
        (scheme:load file-path environment))))))
